.class public Llt/noframe/gpsfarmguide/views/ActivityDrawer;
.super Llt/noframe/gpsfarmguide/views/BaseActivity;
.source "ActivityDrawer.java"

# interfaces
.implements Llt/noframe/gpsfarmguide/NavigationDrawerFragment$NavigationDrawerCallbacks;
.implements Llt/noframe/gpsfarmguide/SplashScreen$OnSplashScreenListener;


# annotations
.annotation system Ldalvik/annotation/MemberClasses;
    value = {
        Llt/noframe/gpsfarmguide/views/ActivityDrawer$LocationPermissionBroadcastReceiver;,
        Llt/noframe/gpsfarmguide/views/ActivityDrawer$FragmentOnBackPressed;,
        Llt/noframe/gpsfarmguide/views/ActivityDrawer$FragmentTouchListener;
    }
.end annotation


# static fields
.field public static REQUEST_SELECT_BACKUP_RESTORE_PLACE:I = 0x8d

.field public static REQUEST_SELECT_BACKUP_SAVE_PLACE:I = 0x8e


# instance fields
.field private ACTION_USB_PERMISSION:Ljava/lang/String;

.field private USB_CONNECTED_ACTION:Ljava/lang/String;

.field private currentFragment:Landroidx/fragment/app/Fragment;

.field private currentFragmentPosition:I

.field private fireAnalytics:Llt/noframe/gpsfarmguide/analytics/FireAnalytics;

.field private fragmentTouchListener:Llt/noframe/gpsfarmguide/views/ActivityDrawer$FragmentTouchListener;

.field private internetReceiverFilter:Landroid/content/IntentFilter;

.field private isUpdateDialogShown:Ljava/lang/Boolean;

.field private locationPermissionBroadcastReceiver:Llt/noframe/gpsfarmguide/views/ActivityDrawer$LocationPermissionBroadcastReceiver;

.field private mDrawerLayout:Landroidx/drawerlayout/widget/DrawerLayout;

.field private mNavigationDrawerFragment:Llt/noframe/gpsfarmguide/NavigationDrawerFragment;

.field private mPurchaseHandler:Llt/noframe/gpsfarmguide/purchases/NavigatorBillingHandler;

.field private mUsbReceiver:Landroid/content/BroadcastReceiver;

.field private onBackPressed:Llt/noframe/gpsfarmguide/views/ActivityDrawer$FragmentOnBackPressed;

.field private usbConnectedReceiver:Landroid/content/BroadcastReceiver;


# direct methods
.method public constructor <init>()V
    .locals 1

    .line 53
    invoke-direct {p0}, Llt/noframe/gpsfarmguide/views/BaseActivity;-><init>()V

    const/4 v0, -0x1

    .line 59
    iput v0, p0, Llt/noframe/gpsfarmguide/views/ActivityDrawer;->currentFragmentPosition:I

    const/4 v0, 0x0

    .line 83
    invoke-static {v0}, Ljava/lang/Boolean;->valueOf(Z)Ljava/lang/Boolean;

    move-result-object v0

    iput-object v0, p0, Llt/noframe/gpsfarmguide/views/ActivityDrawer;->isUpdateDialogShown:Ljava/lang/Boolean;

    const-string v0, "com.android.example.USB_PERMISSION"

    .line 357
    iput-object v0, p0, Llt/noframe/gpsfarmguide/views/ActivityDrawer;->ACTION_USB_PERMISSION:Ljava/lang/String;

    .line 358
    new-instance v0, Llt/noframe/gpsfarmguide/views/ActivityDrawer$1;

    invoke-direct {v0, p0}, Llt/noframe/gpsfarmguide/views/ActivityDrawer$1;-><init>(Llt/noframe/gpsfarmguide/views/ActivityDrawer;)V

    iput-object v0, p0, Llt/noframe/gpsfarmguide/views/ActivityDrawer;->mUsbReceiver:Landroid/content/BroadcastReceiver;

    const-string v0, "android.hardware.usb.action.USB_DEVICE_ATTACHED"

    .line 388
    iput-object v0, p0, Llt/noframe/gpsfarmguide/views/ActivityDrawer;->USB_CONNECTED_ACTION:Ljava/lang/String;

    .line 389
    new-instance v0, Llt/noframe/gpsfarmguide/views/ActivityDrawer$2;

    invoke-direct {v0, p0}, Llt/noframe/gpsfarmguide/views/ActivityDrawer$2;-><init>(Llt/noframe/gpsfarmguide/views/ActivityDrawer;)V

    iput-object v0, p0, Llt/noframe/gpsfarmguide/views/ActivityDrawer;->usbConnectedReceiver:Landroid/content/BroadcastReceiver;

    return-void
.end method

.method static synthetic access$100(Llt/noframe/gpsfarmguide/views/ActivityDrawer;)Ljava/lang/String;
    .locals 0

    .line 53
    iget-object p0, p0, Llt/noframe/gpsfarmguide/views/ActivityDrawer;->ACTION_USB_PERMISSION:Ljava/lang/String;

    return-object p0
.end method

.method private setUserProperties()V
    .locals 6

    .line 158
    invoke-static {}, Llt/noframe/gpsfarmguide/database/DB;->getDB()Llt/noframe/gpsfarmguide/database/DB;

    move-result-object v0

    invoke-virtual {v0}, Llt/noframe/gpsfarmguide/database/DB;->getAreas()Ljava/util/List;

    move-result-object v0

    .line 159
    iget-object v1, p0, Llt/noframe/gpsfarmguide/views/ActivityDrawer;->fireAnalytics:Llt/noframe/gpsfarmguide/analytics/FireAnalytics;

    invoke-interface {v0}, Ljava/util/List;->size()I

    move-result v2

    invoke-virtual {v1, v2}, Llt/noframe/gpsfarmguide/analytics/FireAnalytics;->setUserFieldCount(I)V

    .line 161
    invoke-interface {v0}, Ljava/util/List;->iterator()Ljava/util/Iterator;

    move-result-object v0

    const-wide/16 v1, 0x0

    :goto_0
    invoke-interface {v0}, Ljava/util/Iterator;->hasNext()Z

    move-result v3

    if-eqz v3, :cond_0

    invoke-interface {v0}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v3

    check-cast v3, Llt/noframe/gpsfarmguide/models/MeasuringModel;

    .line 162
    invoke-virtual {v3}, Llt/noframe/gpsfarmguide/models/AbstractMeasuringModel;->getPoints()Ljava/util/List;

    move-result-object v3

    invoke-static {v3}, Llt/noframe/gpsfarmguide/utils/Mathematics;->calculateArea(Ljava/util/List;)D

    move-result-wide v3

    const-string v5, "ha"

    invoke-static {v3, v4, v5}, Llt/noframe/gpsfarmguide/utils/Mathematics;->convertArea(DLjava/lang/String;)D

    move-result-wide v3

    invoke-static {v3, v4}, Llt/noframe/gpsfarmguide/utils/Utils;->smartRounding(D)D

    move-result-wide v3

    add-double/2addr v1, v3

    goto :goto_0

    .line 164
    :cond_0
    iget-object v0, p0, Llt/noframe/gpsfarmguide/views/ActivityDrawer;->fireAnalytics:Llt/noframe/gpsfarmguide/analytics/FireAnalytics;

    invoke-virtual {v0, v1, v2}, Llt/noframe/gpsfarmguide/analytics/FireAnalytics;->setUserFieldArea(D)V

    return-void
.end method

.method private showFragment(Landroidx/fragment/app/Fragment;)V
    .locals 2

    .line 302
    invoke-virtual {p0}, Landroidx/fragment/app/FragmentActivity;->getSupportFragmentManager()Landroidx/fragment/app/FragmentManager;

    move-result-object v0

    .line 303
    invoke-virtual {v0}, Landroidx/fragment/app/FragmentManager;->beginTransaction()Landroidx/fragment/app/FragmentTransaction;

    move-result-object v0

    const v1, 0x7f0900b6

    .line 304
    invoke-virtual {v0, v1, p1}, Landroidx/fragment/app/FragmentTransaction;->replace(ILandroidx/fragment/app/Fragment;)Landroidx/fragment/app/FragmentTransaction;

    .line 305
    invoke-virtual {v0}, Landroidx/fragment/app/FragmentTransaction;->commit()I

    return-void
.end method


# virtual methods
.method public buyRemoveAds()V
    .locals 1

    .line 344
    iget-object v0, p0, Llt/noframe/gpsfarmguide/views/ActivityDrawer;->mPurchaseHandler:Llt/noframe/gpsfarmguide/purchases/NavigatorBillingHandler;

    invoke-virtual {v0}, Llt/noframe/gpsfarmguide/purchases/NavigatorBillingHandler;->buyRemoveAds()V

    return-void
.end method

.method public dispatchTouchEvent(Landroid/view/MotionEvent;)Z
    .locals 1

    .line 253
    invoke-super {p0, p1}, Landroid/app/Activity;->dispatchTouchEvent(Landroid/view/MotionEvent;)Z

    .line 254
    iget-object v0, p0, Llt/noframe/gpsfarmguide/views/ActivityDrawer;->fragmentTouchListener:Llt/noframe/gpsfarmguide/views/ActivityDrawer$FragmentTouchListener;

    if-eqz v0, :cond_0

    .line 255
    invoke-interface {v0, p1}, Llt/noframe/gpsfarmguide/views/ActivityDrawer$FragmentTouchListener;->onTouch(Landroid/view/MotionEvent;)Z

    :cond_0
    const/4 p1, 0x1

    return p1
.end method

.method public getCurrentFragment()Landroidx/fragment/app/Fragment;
    .locals 1

    .line 291
    iget-object v0, p0, Llt/noframe/gpsfarmguide/views/ActivityDrawer;->currentFragment:Landroidx/fragment/app/Fragment;

    return-object v0
.end method

.method public onActivityResult(IILandroid/content/Intent;)V
    .locals 2

    .line 261
    invoke-static {p0}, Llt/noframe/gpsfarmguide/App;->setContext(Landroid/content/Context;)V

    .line 263
    sget-object v0, Llt/noframe/gpsfarmguide/database/DatabaseBackup;->INSTANCE:Llt/noframe/gpsfarmguide/database/DatabaseBackup;

    invoke-virtual {v0, p0, p1, p2, p3}, Llt/noframe/gpsfarmguide/database/DatabaseBackup;->onResultFromActivity(Landroid/app/Activity;IILandroid/content/Intent;)Z

    move-result v0

    if-eqz v0, :cond_0

    return-void

    .line 267
    :cond_0
    invoke-super {p0, p1, p2, p3}, Landroidx/fragment/app/FragmentActivity;->onActivityResult(IILandroid/content/Intent;)V

    .line 268
    invoke-virtual {p0}, Landroidx/fragment/app/FragmentActivity;->getSupportFragmentManager()Landroidx/fragment/app/FragmentManager;

    move-result-object v0

    invoke-virtual {v0}, Landroidx/fragment/app/FragmentManager;->getFragments()Ljava/util/List;

    move-result-object v0

    invoke-interface {v0}, Ljava/util/List;->iterator()Ljava/util/Iterator;

    move-result-object v0

    :cond_1
    :goto_0
    invoke-interface {v0}, Ljava/util/Iterator;->hasNext()Z

    move-result v1

    if-eqz v1, :cond_2

    invoke-interface {v0}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v1

    check-cast v1, Landroidx/fragment/app/Fragment;

    if-eqz v1, :cond_1

    .line 270
    invoke-virtual {v1, p1, p2, p3}, Landroidx/fragment/app/Fragment;->onActivityResult(IILandroid/content/Intent;)V

    goto :goto_0

    :cond_2
    return-void
.end method

.method public onAdsRemoved()V
    .locals 3

    .line 348
    invoke-virtual {p0}, Landroidx/fragment/app/FragmentActivity;->getSupportFragmentManager()Landroidx/fragment/app/FragmentManager;

    move-result-object v0

    .line 349
    invoke-virtual {v0}, Landroidx/fragment/app/FragmentManager;->getFragments()Ljava/util/List;

    move-result-object v0

    .line 350
    invoke-interface {v0}, Ljava/util/List;->iterator()Ljava/util/Iterator;

    move-result-object v0

    :cond_0
    :goto_0
    invoke-interface {v0}, Ljava/util/Iterator;->hasNext()Z

    move-result v1

    if-eqz v1, :cond_1

    invoke-interface {v0}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v1

    check-cast v1, Landroidx/fragment/app/Fragment;

    if-eqz v1, :cond_0

    .line 351
    instance-of v2, v1, Llt/noframe/gpsfarmguide/purchases/RemoveAdsListener;

    if-eqz v2, :cond_0

    .line 352
    check-cast v1, Llt/noframe/gpsfarmguide/purchases/RemoveAdsListener;

    invoke-interface {v1}, Llt/noframe/gpsfarmguide/purchases/RemoveAdsListener;->adsRemoved()V

    goto :goto_0

    :cond_1
    return-void
.end method

.method public onBackPressed()V
    .locals 2

    .line 200
    iget-object v0, p0, Llt/noframe/gpsfarmguide/views/ActivityDrawer;->mDrawerLayout:Landroidx/drawerlayout/widget/DrawerLayout;

    const v1, 0x800003

    invoke-virtual {v0, v1}, Landroidx/drawerlayout/widget/DrawerLayout;->isDrawerOpen(I)Z

    move-result v0

    if-eqz v0, :cond_0

    .line 201
    iget-object v0, p0, Llt/noframe/gpsfarmguide/views/ActivityDrawer;->mDrawerLayout:Landroidx/drawerlayout/widget/DrawerLayout;

    invoke-virtual {v0}, Landroidx/drawerlayout/widget/DrawerLayout;->closeDrawers()V

    goto :goto_0

    .line 202
    :cond_0
    iget-object v0, p0, Llt/noframe/gpsfarmguide/views/ActivityDrawer;->onBackPressed:Llt/noframe/gpsfarmguide/views/ActivityDrawer$FragmentOnBackPressed;

    if-eqz v0, :cond_1

    .line 203
    invoke-interface {v0}, Llt/noframe/gpsfarmguide/views/ActivityDrawer$FragmentOnBackPressed;->onBackPressed()V

    goto :goto_0

    .line 204
    :cond_1
    iget v0, p0, Llt/noframe/gpsfarmguide/views/ActivityDrawer;->currentFragmentPosition:I

    if-eqz v0, :cond_2

    .line 205
    invoke-static {}, Llt/noframe/gpsfarmguide/views/FragmentMap;->newInstance()Llt/noframe/gpsfarmguide/views/FragmentMap;

    move-result-object v0

    const/4 v1, 0x0

    invoke-virtual {p0, v0, v1}, Llt/noframe/gpsfarmguide/views/ActivityDrawer;->setCurrentFragment(Landroidx/fragment/app/Fragment;I)V

    goto :goto_0

    .line 206
    :cond_2
    invoke-super {p0}, Landroidx/activity/ComponentActivity;->onBackPressed()V

    :goto_0
    return-void
.end method

.method protected onCreate(Landroid/os/Bundle;)V
    .locals 4

    .line 93
    new-instance v0, Llt/noframe/gpsfarmguide/analytics/FireAnalytics;

    invoke-direct {v0, p0}, Llt/noframe/gpsfarmguide/analytics/FireAnalytics;-><init>(Landroid/content/Context;)V

    iput-object v0, p0, Llt/noframe/gpsfarmguide/views/ActivityDrawer;->fireAnalytics:Llt/noframe/gpsfarmguide/analytics/FireAnalytics;

    .line 94
    invoke-super {p0, p1}, Llt/noframe/gpsfarmguide/views/BaseActivity;->onCreate(Landroid/os/Bundle;)V

    const p1, 0x7f0c001e

    .line 95
    invoke-virtual {p0, p1}, Landroidx/appcompat/app/AppCompatActivity;->setContentView(I)V

    .line 96
    invoke-static {p0}, Llt/noframe/gpsfarmguide/App;->setContext(Landroid/content/Context;)V

    .line 97
    invoke-static {}, Llt/noframe/gpsfarmguide/App;->getTracker()Lcom/google/android/gms/analytics/Tracker;

    .line 99
    new-instance p1, Llt/noframe/gpsfarmguide/purchases/NavigatorBillingHandler;

    invoke-direct {p1, p0}, Llt/noframe/gpsfarmguide/purchases/NavigatorBillingHandler;-><init>(Llt/noframe/gpsfarmguide/views/ActivityDrawer;)V

    iput-object p1, p0, Llt/noframe/gpsfarmguide/views/ActivityDrawer;->mPurchaseHandler:Llt/noframe/gpsfarmguide/purchases/NavigatorBillingHandler;

    .line 100
    iget-object p1, p0, Llt/noframe/gpsfarmguide/views/ActivityDrawer;->mPurchaseHandler:Llt/noframe/gpsfarmguide/purchases/NavigatorBillingHandler;

    invoke-virtual {p1}, Llt/noframe/gpsfarmguide/purchases/NavigatorBillingHandler;->onCreate()V

    const p1, 0x7f090262

    .line 102
    invoke-virtual {p0, p1}, Landroidx/appcompat/app/AppCompatActivity;->findViewById(I)Landroid/view/View;

    move-result-object p1

    check-cast p1, Landroidx/appcompat/widget/Toolbar;

    .line 103
    invoke-virtual {p0}, Landroidx/appcompat/app/AppCompatActivity;->getResources()Landroid/content/res/Resources;

    move-result-object v0

    const v1, 0x106000b

    invoke-virtual {v0, v1}, Landroid/content/res/Resources;->getColor(I)I

    move-result v0

    invoke-virtual {p1, v0}, Landroidx/appcompat/widget/Toolbar;->setTitleTextColor(I)V

    .line 104
    invoke-virtual {p0, p1}, Landroidx/appcompat/app/AppCompatActivity;->setSupportActionBar(Landroidx/appcompat/widget/Toolbar;)V

    .line 105
    invoke-static {}, Llt/noframe/gpsfarmguide/Data;->getInstance()Llt/noframe/gpsfarmguide/Data;

    move-result-object v0

    invoke-virtual {v0, p1}, Llt/noframe/gpsfarmguide/Data;->setToolbar(Landroidx/appcompat/widget/Toolbar;)V

    .line 107
    invoke-static {p0}, Llt/noframe/gpsfarmguide/utils/Preferences;->isKeepScreenOn(Landroid/content/Context;)Z

    move-result p1

    invoke-static {p0, p1}, Llt/noframe/gpsfarmguide/utils/ScreenHelper;->keepScreenOn(Landroid/content/Context;Z)V

    .line 112
    invoke-virtual {p0}, Landroidx/fragment/app/FragmentActivity;->getSupportFragmentManager()Landroidx/fragment/app/FragmentManager;

    move-result-object p1

    const v0, 0x7f09018e

    invoke-virtual {p1, v0}, Landroidx/fragment/app/FragmentManager;->findFragmentById(I)Landroidx/fragment/app/Fragment;

    move-result-object p1

    check-cast p1, Llt/noframe/gpsfarmguide/NavigationDrawerFragment;

    iput-object p1, p0, Llt/noframe/gpsfarmguide/views/ActivityDrawer;->mNavigationDrawerFragment:Llt/noframe/gpsfarmguide/NavigationDrawerFragment;

    .line 114
    iget-object p1, p0, Llt/noframe/gpsfarmguide/views/ActivityDrawer;->mNavigationDrawerFragment:Llt/noframe/gpsfarmguide/NavigationDrawerFragment;

    invoke-virtual {p1}, Landroidx/fragment/app/Fragment;->getView()Landroid/view/View;

    move-result-object p1

    invoke-virtual {p1}, Landroid/view/View;->getLayoutParams()Landroid/view/ViewGroup$LayoutParams;

    move-result-object p1

    check-cast p1, Landroidx/drawerlayout/widget/DrawerLayout$LayoutParams;

    .line 115
    invoke-static {}, Llt/noframe/gpsfarmguide/Data;->getInstance()Llt/noframe/gpsfarmguide/Data;

    move-result-object v1

    invoke-virtual {v1, p0}, Llt/noframe/gpsfarmguide/Data;->getToolbarheight(Landroid/content/Context;)I

    move-result v1

    const/4 v2, 0x0

    invoke-virtual {p1, v2, v1, v2, v2}, Landroid/view/ViewGroup$MarginLayoutParams;->setMargins(IIII)V

    .line 116
    iget-object v1, p0, Llt/noframe/gpsfarmguide/views/ActivityDrawer;->mNavigationDrawerFragment:Llt/noframe/gpsfarmguide/NavigationDrawerFragment;

    invoke-virtual {v1}, Landroidx/fragment/app/Fragment;->getView()Landroid/view/View;

    move-result-object v1

    invoke-virtual {v1, p1}, Landroid/view/View;->setLayoutParams(Landroid/view/ViewGroup$LayoutParams;)V

    const p1, 0x7f0900ed

    .line 119
    invoke-virtual {p0, p1}, Landroidx/appcompat/app/AppCompatActivity;->findViewById(I)Landroid/view/View;

    move-result-object p1

    check-cast p1, Landroidx/drawerlayout/widget/DrawerLayout;

    iput-object p1, p0, Llt/noframe/gpsfarmguide/views/ActivityDrawer;->mDrawerLayout:Landroidx/drawerlayout/widget/DrawerLayout;

    .line 121
    iget-object p1, p0, Llt/noframe/gpsfarmguide/views/ActivityDrawer;->mNavigationDrawerFragment:Llt/noframe/gpsfarmguide/NavigationDrawerFragment;

    iget-object v1, p0, Llt/noframe/gpsfarmguide/views/ActivityDrawer;->mDrawerLayout:Landroidx/drawerlayout/widget/DrawerLayout;

    invoke-virtual {p1, v0, v1}, Llt/noframe/gpsfarmguide/NavigationDrawerFragment;->setUp(ILandroidx/drawerlayout/widget/DrawerLayout;)V

    .line 123
    new-instance p1, Landroid/content/IntentFilter;

    const-string v0, "android.net.conn.CONNECTIVITY_CHANGE"

    invoke-direct {p1, v0}, Landroid/content/IntentFilter;-><init>(Ljava/lang/String;)V

    iput-object p1, p0, Llt/noframe/gpsfarmguide/views/ActivityDrawer;->internetReceiverFilter:Landroid/content/IntentFilter;

    .line 125
    new-instance p1, Llt/noframe/gpsfarmguide/views/ActivityDrawer$LocationPermissionBroadcastReceiver;

    const/4 v0, 0x0

    invoke-direct {p1, p0, v0}, Llt/noframe/gpsfarmguide/views/ActivityDrawer$LocationPermissionBroadcastReceiver;-><init>(Llt/noframe/gpsfarmguide/views/ActivityDrawer;Llt/noframe/gpsfarmguide/views/ActivityDrawer$1;)V

    iput-object p1, p0, Llt/noframe/gpsfarmguide/views/ActivityDrawer;->locationPermissionBroadcastReceiver:Llt/noframe/gpsfarmguide/views/ActivityDrawer$LocationPermissionBroadcastReceiver;

    .line 127
    new-instance p1, Llt/noframe/gpsfarmguide/utils/FirebaseRemoteConfigFetcher;

    invoke-direct {p1}, Llt/noframe/gpsfarmguide/utils/FirebaseRemoteConfigFetcher;-><init>()V

    .line 128
    invoke-virtual {p1, p0}, Llt/noframe/gpsfarmguide/utils/FirebaseRemoteConfigFetcher;->init(Landroid/content/Context;)V

    .line 133
    new-instance v0, Llt/noframe/gpsfarmguide/control/LocaleChecker;

    invoke-direct {v0}, Llt/noframe/gpsfarmguide/control/LocaleChecker;-><init>()V

    invoke-virtual {v0, p0}, Llt/noframe/gpsfarmguide/control/LocaleChecker;->checkLocale(Landroid/content/Context;)Z

    move-result v0

    if-nez v0, :cond_1

    .line 134
    sget-object v0, Llt/noframe/gpsfarmguide/dialogs/UpdateDialog;->INSTANCE:Llt/noframe/gpsfarmguide/dialogs/UpdateDialog;

    const-wide/16 v1, 0x0

    const-string v3, "UpdateDialogVersionCode"

    invoke-virtual {p1, v3, v1, v2}, Llt/noframe/gpsfarmguide/utils/FirebaseRemoteConfigFetcher;->getLong(Ljava/lang/String;J)J

    move-result-wide v1

    long-to-int p1, v1

    invoke-virtual {v0, p1}, Llt/noframe/gpsfarmguide/dialogs/UpdateDialog;->showIfTriggered(I)Z

    move-result p1

    if-nez p1, :cond_0

    .line 135
    new-instance p1, Llt/noframe/gpsfarmguide/dialogs/FamAppsPromoDialog;

    invoke-direct {p1}, Llt/noframe/gpsfarmguide/dialogs/FamAppsPromoDialog;-><init>()V

    invoke-virtual {p1, p0}, Llt/noframe/gpsfarmguide/dialogs/FamAppsPromoDialog;->showIf(Landroidx/appcompat/app/AppCompatActivity;)Z

    move-result p1

    if-nez p1, :cond_1

    .line 136
    invoke-static {}, Llt/noframe/ratemeplease/RateMePls;->getInstance()Llt/noframe/ratemeplease/RateMePlsKotlin;

    move-result-object p1

    invoke-virtual {p1, p0}, Llt/noframe/ratemeplease/RateMePlsKotlin;->showIfTriggered(Landroidx/fragment/app/FragmentActivity;)Z

    move-result p1

    if-nez p1, :cond_1

    .line 137
    invoke-static {}, Lcom/farmis/feedme/FeedMe;->getInstance()Lcom/farmis/feedme/FeedMeMain;

    move-result-object p1

    invoke-virtual {p1, p0}, Lcom/farmis/feedme/FeedMeMain;->showIfTriggered(Landroidx/fragment/app/FragmentActivity;)Z

    goto :goto_0

    .line 141
    :cond_0
    iget-object p1, p0, Llt/noframe/gpsfarmguide/views/ActivityDrawer;->isUpdateDialogShown:Ljava/lang/Boolean;

    invoke-virtual {p1}, Ljava/lang/Boolean;->booleanValue()Z

    move-result p1

    if-nez p1, :cond_1

    const/4 p1, 0x1

    .line 142
    invoke-static {p1}, Ljava/lang/Boolean;->valueOf(Z)Ljava/lang/Boolean;

    move-result-object p1

    iput-object p1, p0, Llt/noframe/gpsfarmguide/views/ActivityDrawer;->isUpdateDialogShown:Ljava/lang/Boolean;

    .line 143
    sget-object p1, Llt/noframe/gpsfarmguide/dialogs/UpdateDialog;->INSTANCE:Llt/noframe/gpsfarmguide/dialogs/UpdateDialog;

  #  invoke-virtual {p1, p0}, Llt/noframe/gpsfarmguide/dialogs/UpdateDialog;->show(Landroid/content/Context;)V

    .line 147
    :cond_1
    :goto_0
    invoke-direct {p0}, Llt/noframe/gpsfarmguide/views/ActivityDrawer;->setUserProperties()V

    .line 148
    iget-object p1, p0, Llt/noframe/gpsfarmguide/views/ActivityDrawer;->mUsbReceiver:Landroid/content/BroadcastReceiver;

    new-instance v0, Landroid/content/IntentFilter;

    iget-object v1, p0, Llt/noframe/gpsfarmguide/views/ActivityDrawer;->ACTION_USB_PERMISSION:Ljava/lang/String;

    invoke-direct {v0, v1}, Landroid/content/IntentFilter;-><init>(Ljava/lang/String;)V

    invoke-virtual {p0, p1, v0}, Landroid/app/Activity;->registerReceiver(Landroid/content/BroadcastReceiver;Landroid/content/IntentFilter;)Landroid/content/Intent;

    .line 149
    iget-object p1, p0, Llt/noframe/gpsfarmguide/views/ActivityDrawer;->usbConnectedReceiver:Landroid/content/BroadcastReceiver;

    new-instance v0, Landroid/content/IntentFilter;

    iget-object v1, p0, Llt/noframe/gpsfarmguide/views/ActivityDrawer;->USB_CONNECTED_ACTION:Ljava/lang/String;

    invoke-direct {v0, v1}, Landroid/content/IntentFilter;-><init>(Ljava/lang/String;)V

    invoke-virtual {p0, p1, v0}, Landroid/app/Activity;->registerReceiver(Landroid/content/BroadcastReceiver;Landroid/content/IntentFilter;)Landroid/content/Intent;

    .line 150
    invoke-static {p0}, Llt/noframe/gpsfarmguide/views/MyActivityDrawerUtil;->myDrawerInit(Llt/noframe/gpsfarmguide/views/ActivityDrawer;)V

    return-void
.end method

.method protected onDestroy()V
    .locals 1

    .line 169
    sget-object v0, Llt/farmis/libraries/externalgps/ExternalGPS;->Companion:Llt/farmis/libraries/externalgps/ExternalGPS$Companion;

    invoke-virtual {v0}, Llt/farmis/libraries/externalgps/ExternalGPS$Companion;->getInstance()Llt/farmis/libraries/externalgps/ExternalGPS;

    move-result-object v0

    invoke-virtual {v0}, Llt/farmis/libraries/externalgps/ExternalGPS;->disconnect()V

    .line 170
    iget-object v0, p0, Llt/noframe/gpsfarmguide/views/ActivityDrawer;->mUsbReceiver:Landroid/content/BroadcastReceiver;

    invoke-virtual {p0, v0}, Landroid/app/Activity;->unregisterReceiver(Landroid/content/BroadcastReceiver;)V

    .line 171
    iget-object v0, p0, Llt/noframe/gpsfarmguide/views/ActivityDrawer;->usbConnectedReceiver:Landroid/content/BroadcastReceiver;

    invoke-virtual {p0, v0}, Landroid/app/Activity;->unregisterReceiver(Landroid/content/BroadcastReceiver;)V

    .line 172
    iget-object v0, p0, Llt/noframe/gpsfarmguide/views/ActivityDrawer;->mPurchaseHandler:Llt/noframe/gpsfarmguide/purchases/NavigatorBillingHandler;

    invoke-virtual {v0}, Llt/noframe/gpsfarmguide/purchases/NavigatorBillingHandler;->onDestroy()V

    .line 173
    invoke-super {p0}, Landroidx/appcompat/app/AppCompatActivity;->onDestroy()V

    return-void
.end method

.method public onNavigationDrawerItemSelected(I)V
    .locals 1

    const/4 v0, 0x0

    .line 221
    iput-object v0, p0, Llt/noframe/gpsfarmguide/views/ActivityDrawer;->currentFragment:Landroidx/fragment/app/Fragment;

    if-nez p1, :cond_0

    .line 222
    iget v0, p0, Llt/noframe/gpsfarmguide/views/ActivityDrawer;->currentFragmentPosition:I

    if-eq v0, p1, :cond_0

    .line 223
    iget-object v0, p0, Llt/noframe/gpsfarmguide/views/ActivityDrawer;->fireAnalytics:Llt/noframe/gpsfarmguide/analytics/FireAnalytics;

    invoke-virtual {v0}, Llt/noframe/gpsfarmguide/analytics/FireAnalytics;->sendDrawerMap()V

    .line 224
    invoke-static {}, Llt/noframe/gpsfarmguide/views/FragmentMap;->newInstance()Llt/noframe/gpsfarmguide/views/FragmentMap;

    move-result-object v0

    iput-object v0, p0, Llt/noframe/gpsfarmguide/views/ActivityDrawer;->currentFragment:Landroidx/fragment/app/Fragment;

    goto :goto_0

    :cond_0
    const/4 v0, 0x1

    if-ne p1, v0, :cond_1

    .line 226
    iget v0, p0, Llt/noframe/gpsfarmguide/views/ActivityDrawer;->currentFragmentPosition:I

    if-eq v0, p1, :cond_1

    .line 227
    iget-object v0, p0, Llt/noframe/gpsfarmguide/views/ActivityDrawer;->fireAnalytics:Llt/noframe/gpsfarmguide/analytics/FireAnalytics;

    invoke-virtual {v0}, Llt/noframe/gpsfarmguide/analytics/FireAnalytics;->sendDrawerFieldList()V

    .line 228
    invoke-static {}, Llt/noframe/gpsfarmguide/views/FragmentMeasuresList;->newInstance()Llt/noframe/gpsfarmguide/views/FragmentMeasuresList;

    move-result-object v0

    iput-object v0, p0, Llt/noframe/gpsfarmguide/views/ActivityDrawer;->currentFragment:Landroidx/fragment/app/Fragment;

    goto :goto_0

    :cond_1
    const/4 v0, 0x2

    if-ne p1, v0, :cond_2

    .line 230
    iget v0, p0, Llt/noframe/gpsfarmguide/views/ActivityDrawer;->currentFragmentPosition:I

    if-eq v0, p1, :cond_2

    .line 231
    iget-object v0, p0, Llt/noframe/gpsfarmguide/views/ActivityDrawer;->fireAnalytics:Llt/noframe/gpsfarmguide/analytics/FireAnalytics;

    invoke-virtual {v0}, Llt/noframe/gpsfarmguide/analytics/FireAnalytics;->sendDrawerTrack()V

    .line 232
    invoke-static {}, Llt/noframe/gpsfarmguide/views/FragmentTracksList;->newInstance()Llt/noframe/gpsfarmguide/views/FragmentTracksList;

    move-result-object v0

    iput-object v0, p0, Llt/noframe/gpsfarmguide/views/ActivityDrawer;->currentFragment:Landroidx/fragment/app/Fragment;

    goto :goto_0

    :cond_2
    const/4 v0, 0x3

    if-ne p1, v0, :cond_3

    .line 234
    iget v0, p0, Llt/noframe/gpsfarmguide/views/ActivityDrawer;->currentFragmentPosition:I

    if-eq v0, p1, :cond_3

    .line 235
    iget-object v0, p0, Llt/noframe/gpsfarmguide/views/ActivityDrawer;->fireAnalytics:Llt/noframe/gpsfarmguide/analytics/FireAnalytics;

    invoke-virtual {v0}, Llt/noframe/gpsfarmguide/analytics/FireAnalytics;->sendDrawerSettings()V

    .line 236
    new-instance v0, Llt/noframe/gpsfarmguide/views/FragmentSettings;

    invoke-direct {v0}, Llt/noframe/gpsfarmguide/views/FragmentSettings;-><init>()V

    iput-object v0, p0, Llt/noframe/gpsfarmguide/views/ActivityDrawer;->currentFragment:Landroidx/fragment/app/Fragment;

    goto :goto_0

    :cond_3
    const/4 v0, 0x4

    if-ne p1, v0, :cond_4

    .line 240
    iget v0, p0, Llt/noframe/gpsfarmguide/views/ActivityDrawer;->currentFragmentPosition:I

    if-eq v0, p1, :cond_4

    .line 241
    iget-object v0, p0, Llt/noframe/gpsfarmguide/views/ActivityDrawer;->fireAnalytics:Llt/noframe/gpsfarmguide/analytics/FireAnalytics;

    invoke-virtual {v0}, Llt/noframe/gpsfarmguide/analytics/FireAnalytics;->sendDrawerContactUs()V

    .line 242
    new-instance v0, Llt/noframe/gpsfarmguide/utils/SendEmail;

    invoke-direct {v0, p0}, Llt/noframe/gpsfarmguide/utils/SendEmail;-><init>(Landroid/content/Context;)V

    invoke-virtual {v0, p0}, Llt/noframe/gpsfarmguide/utils/SendEmail;->send(Landroid/content/Context;)V

    .line 245
    :cond_4
    :goto_0
    iget-object v0, p0, Llt/noframe/gpsfarmguide/views/ActivityDrawer;->currentFragment:Landroidx/fragment/app/Fragment;

    if-eqz v0, :cond_5

    .line 246
    invoke-direct {p0, v0}, Llt/noframe/gpsfarmguide/views/ActivityDrawer;->showFragment(Landroidx/fragment/app/Fragment;)V

    .line 247
    iput p1, p0, Llt/noframe/gpsfarmguide/views/ActivityDrawer;->currentFragmentPosition:I

    :cond_5
    return-void
.end method

.method protected onPause()V
    .locals 1

    .line 190
    :try_start_0
    iget-object v0, p0, Llt/noframe/gpsfarmguide/views/ActivityDrawer;->locationPermissionBroadcastReceiver:Llt/noframe/gpsfarmguide/views/ActivityDrawer$LocationPermissionBroadcastReceiver;

    invoke-virtual {p0, v0}, Landroid/app/Activity;->unregisterReceiver(Landroid/content/BroadcastReceiver;)V
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    goto :goto_0

    :catch_0
    move-exception v0

    .line 192
    invoke-virtual {v0}, Ljava/lang/Exception;->printStackTrace()V

    .line 194
    :goto_0
    invoke-super {p0}, Landroidx/fragment/app/FragmentActivity;->onPause()V

    return-void
.end method

.method public onRequestPermissionsResult(I[Ljava/lang/String;[I)V
    .locals 2

    .line 325
    invoke-super {p0, p1, p2, p3}, Landroidx/fragment/app/FragmentActivity;->onRequestPermissionsResult(I[Ljava/lang/String;[I)V

    .line 326
    invoke-virtual {p0}, Landroidx/fragment/app/FragmentActivity;->getSupportFragmentManager()Landroidx/fragment/app/FragmentManager;

    move-result-object v0

    .line 327
    invoke-virtual {v0}, Landroidx/fragment/app/FragmentManager;->getFragments()Ljava/util/List;

    move-result-object v0

    .line 328
    invoke-interface {v0}, Ljava/util/List;->iterator()Ljava/util/Iterator;

    move-result-object v0

    :cond_0
    :goto_0
    invoke-interface {v0}, Ljava/util/Iterator;->hasNext()Z

    move-result v1

    if-eqz v1, :cond_1

    invoke-interface {v0}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v1

    check-cast v1, Landroidx/fragment/app/Fragment;

    if-eqz v1, :cond_0

    .line 330
    invoke-virtual {v1, p1, p2, p3}, Landroidx/fragment/app/Fragment;->onRequestPermissionsResult(I[Ljava/lang/String;[I)V

    goto :goto_0

    :cond_1
    return-void
.end method

.method protected onResume()V
    .locals 3

    .line 178
    invoke-static {p0}, Llt/noframe/gpsfarmguide/App;->setContext(Landroid/content/Context;)V

    .line 180
    :try_start_0
    iget-object v0, p0, Llt/noframe/gpsfarmguide/views/ActivityDrawer;->locationPermissionBroadcastReceiver:Llt/noframe/gpsfarmguide/views/ActivityDrawer$LocationPermissionBroadcastReceiver;

    new-instance v1, Landroid/content/IntentFilter;

    const-string v2, "lt.noframe.gpsfarmguide.location_permission_void"

    invoke-direct {v1, v2}, Landroid/content/IntentFilter;-><init>(Ljava/lang/String;)V

    invoke-virtual {p0, v0, v1}, Landroid/app/Activity;->registerReceiver(Landroid/content/BroadcastReceiver;Landroid/content/IntentFilter;)Landroid/content/Intent;
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    goto :goto_0

    :catch_0
    move-exception v0

    .line 182
    invoke-virtual {v0}, Ljava/lang/Exception;->printStackTrace()V

    .line 184
    :goto_0
    invoke-super {p0}, Landroidx/fragment/app/FragmentActivity;->onResume()V

    return-void
.end method

.method public onStart()V
    .locals 0

    .line 211
    invoke-super {p0}, Landroidx/appcompat/app/AppCompatActivity;->onStart()V

    return-void
.end method

.method protected onStop()V
    .locals 0

    .line 216
    invoke-super {p0}, Landroidx/appcompat/app/AppCompatActivity;->onStop()V

    return-void
.end method

.method public setCurrentFragment(Landroidx/fragment/app/Fragment;I)V
    .locals 0

    .line 284
    iput-object p1, p0, Llt/noframe/gpsfarmguide/views/ActivityDrawer;->currentFragment:Landroidx/fragment/app/Fragment;

    .line 285
    iput p2, p0, Llt/noframe/gpsfarmguide/views/ActivityDrawer;->currentFragmentPosition:I

    .line 286
    invoke-direct {p0, p1}, Llt/noframe/gpsfarmguide/views/ActivityDrawer;->showFragment(Landroidx/fragment/app/Fragment;)V

    return-void
.end method

.method public setDrawerLocked(Z)V
    .locals 0

    if-eqz p1, :cond_0

    .line 297
    iget-object p1, p0, Llt/noframe/gpsfarmguide/views/ActivityDrawer;->mNavigationDrawerFragment:Llt/noframe/gpsfarmguide/NavigationDrawerFragment;

    invoke-virtual {p1}, Llt/noframe/gpsfarmguide/NavigationDrawerFragment;->lockDrawerClosed()V

    goto :goto_0

    .line 298
    :cond_0
    iget-object p1, p0, Llt/noframe/gpsfarmguide/views/ActivityDrawer;->mNavigationDrawerFragment:Llt/noframe/gpsfarmguide/NavigationDrawerFragment;

    invoke-virtual {p1}, Llt/noframe/gpsfarmguide/NavigationDrawerFragment;->unlockDrawer()V

    :goto_0
    return-void
.end method

.method public setFragmentTouchListener(Llt/noframe/gpsfarmguide/views/ActivityDrawer$FragmentTouchListener;)V
    .locals 0

    .line 276
    iput-object p1, p0, Llt/noframe/gpsfarmguide/views/ActivityDrawer;->fragmentTouchListener:Llt/noframe/gpsfarmguide/views/ActivityDrawer$FragmentTouchListener;

    return-void
.end method

.method public setOnBackPressed(Llt/noframe/gpsfarmguide/views/ActivityDrawer$FragmentOnBackPressed;)V
    .locals 0

    .line 280
    iput-object p1, p0, Llt/noframe/gpsfarmguide/views/ActivityDrawer;->onBackPressed:Llt/noframe/gpsfarmguide/views/ActivityDrawer$FragmentOnBackPressed;

    return-void
.end method